<template>
  <el-page-header @back="goBack" :icon="ArrowLeft">
    <template #content>
      <el-tag :type="props.modelValue.type === 0 ? 'success' : ''">{{
        cabinet.tags["cabinetType"][props.modelValue.type]
      }}</el-tag>
    </template>
  </el-page-header>
</template>
<script lang="ts" setup>
import { ref, onUnmounted, onMounted, inject } from "vue";
import { useRouter, useRoute } from "vue-router";
import { ArrowLeft } from "@element-plus/icons-vue";

const router = useRouter();
const route = useRoute();
const cabinet = inject("cabinet") as any;

interface Props {
  modelValue: any;
}
const props = withDefaults(defineProps<Props>(), {
  modelValue: {},
});

//后退
const goBack = () => {
  router.back();
};
//持续在单个设备详情页面实时获取数据进行更新
onMounted(() => {});
</script>
<style lang="scss" scoped></style>
